/*
 * 常用css
 */

view,
scroll-view,
swiper,
button,
input,
textarea,
label,
navigator,
image {
	box-sizing: border-box;
}
// 内外边距、字体大小
@for $i from 0 through 200 {
	@if $i % 2 == 0 or $i % 5 == 0 {
		@each $short, $long in l left, t top, r right, b bottom {
			.m#{$short}-#{$i} {
				margin-#{$long}: $i + rpx;
			}
			.p#{$short}-#{$i} {
				padding-#{$long}: $i + rpx;
			}
		}
		.size-#{$i} {
			font-size: $i + rpx;
		}
		.img-#{$i} {
			width: $i + rpx;
			height: $i + rpx;
		}
	}
}
// 间隔行
@for $i from 10 through 300 {
	@if $i % 10 == 0 {
		.gap-#{$i} {
			width: 100%;
			height: $i + rpx;
		}
	}
}
// 文本超出几行转省略号
@for $i from 1 through 5 {
	.line-#{$i} {
		@if $i == '1' {
			overflow: hidden;
			white-space: nowrap;
			text-overflow: ellipsis;
		} @else {
			display: -webkit-box!important;
			overflow: hidden;
			text-overflow: ellipsis;
			word-break: break-all;
			-webkit-line-clamp: $i;
			-webkit-box-orient: vertical!important;
		}
	}
}

// 文本换行
.word-warp{
	word-break: break-all;
	word-wrap: break-word;
	line-break: anywhere;
}
// 文本不换行
.word-nowarp{
	white-space: nowrap;
}
// 首行缩进
.word-p{
	text-indent:2em;
}
// 删除边框
.border-none{
	border: none !important;
}
.text-center{
	text-align: center;
}
.text-left{
	text-align: left;
}
.text-right{
	text-align: right;
}
.text-bold{
	font-weight: bold;
}

.pos-rel{
	position: relative;
}
.pos-abs{
	position: absolute;
}

// flex
.flex {
	display: flex;
}

.flex-1 {
	flex: 1;
}
.flex-2 {
	flex: 2;
}

.flex-direction {
	flex-direction: column;
}

.flex-wrap {
	flex-wrap: wrap;
}
.flex-shrink{
	flex-shrink: 0;
}

.align-start {
	align-items: flex-start;
}

.align-end {
	align-items: flex-end;
}

.align-center {
	align-items: center;
}

.justify-start {
	justify-content: flex-start;
}

.justify-end {
	justify-content: flex-end;
}

.justify-center {
	justify-content: center;
}

.justify-between {
	justify-content: space-between;
}

.justify-around {
	justify-content: space-around;
}
.flex-center{
	display: flex;
	justify-content: center;
	align-items: center;
}

.content{
	position: relative;
	z-index: 1;
}

.opa-8{
	opacity: 0.8;
}
.opa-6{
	opacity: 0.6;
}
.lineth{
	text-decoration: line-through;
}